// import Mapper from './_mapper'

// class ReceivingMethodOption {
//   name: string
//   value: string
//   constructor(name: string, value: string) {
//     this.name = name
//     this.value = value
//   }
//   equals(inValue: string | undefined) {
//     return inValue != undefined && this.value === inValue
//   }
// }
// export class ReceivingMethod extends Mapper<string> {
//   public static DELIVERY = new ReceivingMethodOption('配送', '1')
//   public static SHOP_EAT = new ReceivingMethodOption('店食', '2')
//   public static SELF_PICKUP = new ReceivingMethodOption('自提', '3')
//   protected enums = {
//     '1': '配送',
//     '2': '店食',
//     '3': '自提'
//   }
// }

// export const receivingMethodMapper = new ReceivingMethod()

export enum ReceivingMethodType {
  DELIVERY = 1,
  SHOP_EAT = 2,
  SELF_PICKUP = 3
}

export function receivingMethodTypeLabelOf(value: number): string {
  if (value === ReceivingMethodType.DELIVERY) return '配送'
  if (value === ReceivingMethodType.SHOP_EAT) return '店食'
  if (value === ReceivingMethodType.SELF_PICKUP) return '自提'
  return ''
}
